import { Modal } from 'antd'
import { ExclamationCircleOutlined } from '@ant-design/icons'

export function showConfirm({
    title = '确认',
    content,
    onOk,
    onCancel,
    ...props
}) {
    Modal.confirm({
        title,
        icon: <ExclamationCircleOutlined />,
        content,
        okText: '确认',
        cancelText: '取消',
        onOk,
        onCancel,
        ...props,
    })
}

export function showDelete({
    title = '删除确认',
    content = '确定要删除这条记录吗？',
    onOk,
    ...props
}) {
    Modal.confirm({
        title,
        icon: <ExclamationCircleOutlined />,
        content,
        okText: '删除',
        okType: 'danger',
        cancelText: '取消',
        onOk,
        ...props,
    })
} 